import request from '@/utils/request'

export function publishAssignment(data) {
  console.log(request);
  return request({
    url: '/assignment/publish',
    method: 'post',
    data
  })
}

export function courseOptions(params) {
  console.log(request);
  return request({
    url: '/assignment/getCourseOptions',
    method: 'get',
    params
  })
}

export function getAssignment(params) {
  console.log(request);
  return request({
    url: '/assignment/getAssignment',
    method: 'get',
    params
  })
}

export function fecthAssignment(params) {
  console.log(request);
  return request({
    url: '/assignment/fecthAssignment',
    method: 'get',
    params
  })
}

export function editAssignment(params, data) {
  console.log(request);
  return request({
    url: '/assignment/editAssignment',
    method: 'post',
    params,
    data
  })
}

export function deleteAssignment(data) {
  console.log(request);
  return request({
    url: '/assignment/deleteAssignment',
    method: 'post',
    data
  })
}

export function changeStatus(data) {
  console.log(request);
  return request({
    url: '/assignment/changeStatus',
    method: 'post',
    data
  })
}